#ifndef __DHT11_H_
#define __DHT11_H_

#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdint.h>

/* DHT11控制IO操作函数 */
typedef void (*DHT11_out_callback)(int sta);
typedef int (*DHT11_in_callback)(void);

/* DHT11控制IO模式配置 */
typedef void (*DHT11_OutPut_Mode_callback)(void);
typedef void (*DHT11_InPut_Mode_callback)(void);

/* DHT11 us 级延时函数 */
typedef void (*DHT11_delay_us_callback)(uint32_t us);
   	
typedef struct DHT11_init {
	DHT11_out_callback out_cb;
	DHT11_in_callback in_cb;
	DHT11_OutPut_Mode_callback out_mode_cb;
	DHT11_InPut_Mode_callback in_mode_cb;
	DHT11_delay_us_callback delay_us_cb;
} DHT11_init_t;

uint8_t DHT11_Init(DHT11_init_t init_cb);//初始化DHT11
uint8_t DHT11_Read_Data(uint8_t *temp,uint8_t *humi);//读取温湿度

#endif
